﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DigitalAmele.BLL.Adapters;
using DigitalAmele.BLL.Core;

namespace DigitalAmele.BLL.Authantication
{
    public class RolesBs : DigitalAmele.BLL.Abstracts._RolesBs
    {

        public List<Roles> get_for_authority(Guid memberId, int roleTypeId)
        {
            System.Data.SqlClient.SqlCommand sqlcommand = new System.Data.SqlClient.SqlCommand();
            sqlcommand.CommandText = SqlStrrings.RoleSqlStrings.AuthoritySql;
            sqlcommand.Parameters.AddWithValue(Roles.ColumnNames.TypeId, roleTypeId);
            sqlcommand.Parameters.AddWithValue(MemberRoles.ColumnNames.MemberId, memberId);
            try
            {
                return get(sqlcommand);
            }
            catch (Exception ex)
            {
                throw ErrorLogInsert(ex);
            }

        }


    }
}